'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/api/getMock', controller.home.GETMock);//数据
  router.post("/api/SetLogin",controller.home.LoginMock);//修改密码
  router.post('/api/login', controller.home.Login);//登录
  router.post('/api/register', controller.home.Register);//注册
  router.get("/api/getCode",controller.home.getCode)//验证码
  router.get("/api/BlogsMock",controller.home.BlogsMock);//增删改查数据
  router.delete('/api/DelMock/:id', controller.home.DelMock);//删除
  router.post('/api/Search', controller.home.Search);//搜索
  router.post('/api/addMock', controller.home.SETMock);//添加
  router.get("/api/InertMock",controller.home.InertMock)//标签添加
  router.delete("/api/delDelMock/:id",controller.home.DelSMock)//删除
  router.post("/api/inputSet",controller.home.MOCKSearch);//文本框
  //oss 图片上传
  router.post('/uppic', controller.oSS.OSS)
  router.post("/api/img",controller.home.OSSImgMock);
};
